package practice.com0227;

import java.util.Arrays;

public class Symmetry {

    public static void whether(String str) {
//        String str1 = str.toCharArray();
        System.out.println(Arrays.toString(str.toCharArray()));
        int count = 0;
        for (int i = 0, n = str.length()-1; i <= n ; i++) {

            if (str.charAt(i) == str.charAt(n)) {
                n--;

            }else {
                count++;
            }
        }if (count > 0) {
            System.out.println("不对称" + count);
        }else {
            System.out.println("对称" + count);
        }

    }

    public static void main(String[] args) {
        whether("12edaytde21");
    }
}
